import os
#读取yaml文件数据
from time import strftime, localtime, time

import yaml
def get_opject_path():  #获取绝对路径
    return os.path.abspath(os.getcwd().split('common')[0])

def read_config_file(one_noed,tow_noed):# 读取yml文件里面的路径，进行提取
   with open(get_opject_path()+'/config.yml',encoding='utf-8') as f:
       value=yaml.load(stream=f, Loader=yaml.FullLoader)
       return value[one_noed][tow_noed]


def screenshot(noes,name):
    st = strftime('%Y-%m-%d-%H:%M:%S', localtime(time()))
    fime_path=get_opject_path() + '/screenshot/'+st+name+'.png'
    noes.get_screenshot_as_file(fime_path)






if __name__=='__main__':
    pass

